USE [xRepair]
GO
IF OBJECT_ID('[dbo].[GetAllActiveStates]') IS NOT NULL
BEGIN
DROP PROCEDURE [dbo].[GetAllActiveStates]
END
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[GetAllActiveStates]	
AS
BEGIN

	SET NOCOUNT ON;

	SELECT [ID]
		,[StateAbbreviation]
		,[StateName]
		,[CreatedAt]
		,[CreatedBy]
		,[LastUpdatedAt]
		,[LastUpdatedBy]
	FROM [xRepair].[dbo].[States] WITH(NOLOCK)
	WHERE [IsActive] = 1 OR [IsActive] IS NULL

END

